package org.iabako.shared.iservice.generic;

import com.google.gwt.user.client.rpc.AsyncCallback;
import org.iabako.shared.entity.business.AbstractEntity;
import org.iabako.shared.querydefinition.dto.QueryDefinitionDTO;

/**
 * Created by jose on 11/02/14.
 */
public interface CRUDServiceAsync {

    void getNextAvailableId(AsyncCallback<String> callback);

    void getById(Long id, AsyncCallback<AbstractEntity> callback);

    void save(AbstractEntity entity, AsyncCallback<AbstractEntity> callback);

    void remove(Long id, AsyncCallback<Boolean> callback);

    void remove(AbstractEntity entity, AsyncCallback<Boolean> callback);

    void removeAll(QueryDefinitionDTO queryDefinitionDTO, AsyncCallback<Boolean> callback);
}
